<?php
/* @var $this UserController */
/* @var $model User */
/* @var $form CActiveForm */
?>

<div class="wide form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'action'=>Yii::app()->createUrl($this->route),
	'method'=>'get',
)); ?>

	<div class="row">
		<?php echo $form->label($model,'username'); ?>
		<?php echo $form->textField($model,'username',array('size'=>7,'maxlength'=>7, 'style'=>'width:7ch')); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'nama'); ?>
		<?php echo $form->textField($model,'nama',array('size'=>60,'maxlength'=>100, 'style'=>'width:65%')); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'email'); ?>
		<?php echo $form->textField($model,'email',array('size'=>60,'maxlength'=>255, 'style'=>'width:65%')); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'agama_id'); ?>
		<?php echo $form->dropDownList($model, 'agama_id', CHtml::listData(Agama::model()->findAll(array('order'=>'id')), 'id', 'agama'), array('empty'=>'--Pilih Agamanya--', 'style'=>'width:20ch')); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'asalDaerah'); ?>
		<?php echo $form->textArea($model,'asalDaerah',array('size'=>60,'maxlength'=>1000, 'style'=>'width:65%')); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'angkatan_id'); ?>
		<?php echo $form->dropDownList($model, 'angkatan_id', CHtml::listData(Angkatan::model()->findAll(array('order'=>'id')), 'id', 'angkatan'), array('empty'=>'--Pilih Angkatannya--', 'style'=>'width:22ch')); ?>
	</div>

	<div class="row">
		<?php echo $form->label($model,'penempatan'); ?>
		<?php echo $form->textField($model,'penempatan',array('size'=>60,'maxlength'=>100, 'style'=>'width:65%')); ?>
	</div>

	<?php if(Yii::app()->user->isAdmin()){ ?>
	<div class="row">
		<?php echo $form->label($model,'levelUser_id'); ?>
		<?php echo $form->dropDownList($model, 'levelUser_id', CHtml::listData(Leveluser::model()->findAll(array('order'=>'id')), 'id', 'level'), array('empty'=>'--Pilih Levelnya--', 'style'=>'width:22ch')); ?>
	</div>
	<?php } ?>

	<div class="row buttons">
		<?php echo CHtml::submitButton('Lakukan Pencarian'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- search-form -->